<?php
declare (strict_types = 1);

namespace app\api\model\v1;

use think\Model;

/**
 * @mixin \think\Model
 * //整改规则
 */
class RectifyAndReformRules extends AppModel
{
    //

    public function admin(){
        return $this->belongsTo(Admins::class,'admin_id')->field('id,username as name');
    }

    public function unit(){
        return $this->belongsTo(GatherCompany::class,'unit_id')->field('id,gather_company_title as title');
    }

    public function community(){
        return $this->belongsTo(Community::class,'community_id')->field('id,community_title as title');
    }

    public function project(){
        return $this->belongsTo(Project::class,'project_id')->field('id,project_title as title');
    }
}
